﻿using UnityEngine;
using System.Collections;
using System.Collections.Generic;
namespace SGUI
{
    public class UISpriteData 
    {
        public string name = "Sprite";
        public float x = 0;
        public float y = 0;
        public float width = 0;
        public float height = 0;

        public int borderLeft = 0;
        public int borderRight = 0;
        public int borderTop = 0;
        public int borderBottom = 0;

        public int paddingLeft = 0;
        public int paddingRight = 0;
        public int paddingTop = 0;
        public int paddingBottom = 0;
    }
    public class SGAtlas
    {
        public string AtlasName;
        public List<UISpriteData> sprites;
        public Material Mat;
        public UISpriteData GetSprite(string spriteName) 
        {
            if(sprites!=null)
            for (int i = 0; i < sprites.Count;i++)
            {
                if (sprites[i].name == spriteName) 
                {
                    return sprites[i];
                }
            }
            return null;
        }
    }
}
